﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;

using Osiptel.HECO.BE;
using Osiptel.HECO.BL;

public partial class Views_Predeterminados_Frm_FibraOptica : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    [WebMethod]
    public static List<ComponenteBE> ObtenerItemsPorIds(List<int> idsItems)
    {
        ComponenteBL componenteBL = new ComponenteBL();
        List<ComponenteBE> listaComponentes = new List<ComponenteBE>();
        listaComponentes = componenteBL.ObtenerComponentesPorIds(idsItems);
        return listaComponentes.OrderBy(o => o.Orden).ToList();
    }
    [WebMethod]
    public static List<ParametroDetalleBE> ListaTipoInstalacion()
    {
            ParametroDetalleBL paramDetalleBL = new ParametroDetalleBL();
        List<ParametroDetalleBE> listaParamDetalle = new List<ParametroDetalleBE>();
        listaParamDetalle = paramDetalleBL.ObtenerParamsById(8);
        return listaParamDetalle;
    }
    [WebMethod]
    public static string DatosAExcel(List<ComponenteBE> datos)
    {
        String rpta = "";
        ExcelApp excelApp = new ExcelApp();
        excelApp.GenerarExcel(datos, "prederminadoFO");
        return rpta;
    }
}